<%@ page import="org.sky.sys.util.EnumUtils" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/view/inc/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<security:csrfMetaTags/>
<script type="text/javascript" src='${basepath}view/sys/quartz/sysquartzlist.js'></script>
<script type="text/javascript">
//定时任务状态
var QUARTZ_STATUS = <%=EnumUtils.getEnums("SYS.QUARTZ_STATUS") %>;
debugger;
$(function() {
	init();
});
</script> 
</head>
<body>
<div class="easyui-layout"
	 data-options='fit:true,border:false'>
<div class="search" style="height: 50px"
	 data-options="
		region:'north'">
	<table class='noborder'>
		<tr>
			<th><label>任务编号:</label></th>
			<td><input  class="easyui-textbox" data-options="prompt:'输入任务编号'" name="q_code"  id="q_code" ></input></td>
			<th><label>任务名称:</label></th>
			<td><input  class="easyui-textbox" data-options="prompt:'输入任务名称'" name="q_name"  id="q_name" ></input></td>
			<th><label>任务组:</label></th>
			<td><input  class="easyui-textbox" data-options="prompt:'输入任务组'" name="q_groupName"  id="q_groupName" ></input></td>
			<th><label>执行任务类:</label></th>
			<td><input  class="easyui-textbox" data-options="prompt:'输入执行任务类'" name="q_exeClass"  id="q_exeClass" ></input></td>
			<td><a href="javascript:loadSysQuartz()"class="easyui-linkbutton" plain="true" iconCls="icon-search">查询</a></td>
		</tr>
	</table>
</div>
<div data-options="region:'center'">
	<table id="sysquartzdg" class="easyui-datagrid"
		data-options="
				toolbar: '#tb',
				onDblClickRow:function(rowIndex, rowData){
									//SKY_EASYUI.beginEdit('sysquartzdg',rowIndex);
							  }
			">
		<thead>
			<tr>
				<th data-options="field: 'checked', checkbox:true"></th>
				<th data-options="field:'code',width:100">任务编号</th>
				<th data-options="field:'name',width:180">任务名称</th>
				<th data-options="field:'groupName',width:180">任务组</th>
				<th data-options="field:'exeClass',width:180">执行任务类</th>
				<th data-options="field:'cronExpression',width:180">触发时间</th>
				<th data-options="field:'status',width:180,
					formatter:function(value,row){
							return SKY.formatterEnum(value,row,QUARTZ_STATUS);
						}">状态</th>
				<th data-options="field:'note',width:180">备注</th>
			</tr>
		</thead>
	</table>
</div>
</div>
<div id="tb" style="height: auto">
	<a href="javascript:void(0)" class="easyui-linkbutton"
		data-options="iconCls:'icon-add',plain:true" onclick="addSysQuartz()">增加</a>
	<a href="javascript:void(0)" class="easyui-linkbutton"
		data-options="iconCls:'icon-edit',plain:true" onclick="editSysQuartz()">修改</a>
	<a href="javascript:void(0)" class="easyui-linkbutton"
		data-options="iconCls:'icon-20130408025545236_easyicon_net_30',plain:true" onclick="delSysQuartz()">删除</a>
	<a href="javascript:void(0)" class="easyui-linkbutton"
		data-options="iconCls:'icon-06',plain:true" onclick="detailSysQuartz()">查看明细</a>
	<a href="javascript:void(0)" class="easyui-linkbutton"
	   data-options="iconCls:'icon-resultset_last',plain:true" onclick="startSysQuartz()">启动任务</a>
	<a href="javascript:void(0)" class="easyui-linkbutton"
	   data-options="iconCls:'icon-stop',plain:true" onclick="stopSysQuartz()">停止任务</a>
	<a href="javascript:void(0)" class="easyui-linkbutton"
	   data-options="iconCls:'icon-01',plain:true" onclick="pauseSysQuartz()">暂停任务</a>
	<a href="javascript:void(0)" class="easyui-linkbutton"
	   data-options="iconCls:'icon-resultset_next',plain:true" onclick="resumeSysQuartz()">恢复任务</a>
	<a href="javascript:void(0)" class="easyui-linkbutton"
	   data-options="iconCls:'icon-next_green',plain:true" onclick="runSysQuartz()">立即执行(一次)</a>
</div>
</body>
</html>